package net
{
	
	import Base.Net.NetSocket;
	
	import Common.GameNetEvent;
	import Common.GameNetManager;
	

	public class TeamNetHandler
	{
		public function TeamNetHandler()
		{
			
		}
		
		public static function sendJoinTeam( id:int ):void
		{
			var netSocket:NetSocket = GameNetManager.instance.MainNetSocket;
			
			netSocket.writeShort( GameNetEvent.SEND_JOIN_TEAM_SIZE );
			netSocket.writeShort( GameNetEvent.SEND_JOIN_TEAM_ID );
			
			netSocket.writeInt( id );
			
			netSocket.Send();
		}
		
		public static function sendLevelTeam( id:int ):void
		{
			var netSocket:NetSocket = GameNetManager.instance.MainNetSocket;
			
			netSocket.writeShort( GameNetEvent.SEND_LEAVE_TEAM_SIZE );
			netSocket.writeShort( GameNetEvent.SEND_LEAVE_TEAM_ID );
			
			netSocket.writeInt( id );
			
			netSocket.Send();
		}
	}
}